package com.sy.simpleegg.http.callback;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;

abstract class BaseCallback implements Callback {
    @Override
    public void onFailure(Call call, IOException e) {
        onFail(call, e);
    }

    @Override
    public void onResponse(Call call, Response response) throws IOException {
        onResp(call, response);
    }

    public abstract void onFail(Call call, IOException e);

    public abstract void onResp(Call call, Response response) throws IOException;
}
